Systems and methods for determining when to calibrate a pressure sensor of a mobile device

ABSTRACT

A method involves determining weighted metric values for each metric of a plurality of metrics by applying a weight for each metric to a determined value of each metric. The method further involves using the weighted metric values to determine if a pressure sensor of a mobile device should be calibrated using information associated with the first location, and if a determination is made that the pressure sensor of the mobile device should be calibrated using information associated with the first location, then using the information associated with the first location to calibrate the pressure sensor of the mobile device.

RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.17/443,135, filed 21 Jul. 2021, entitled SYSTEMS AND METHODS FORDETERMINING WHEN TO CALIBRATE A PRESSURE SENSOR OF A MOBILE DEVICE,which claims priority to U.S. Pat. No. 11,073,441, filed 26 Mar. 2019,entitled SYSTEMS AND METHODS FOR DETERMINING WHEN TO CALIBRATE APRESSURE SENSOR OF A MOBILE DEVICE; U.S. Pat. Appl. No. 62/676,275,filed 24 May 2018, entitled SYSTEMS AND METHODS FOR DETERMINING WHEN TOCALIBRATE A PRESSURE SENSOR OF A MOBILE DEVICE; and U.S. Pat. Appl. No.62/687,738, filed 20 Jun. 2018 entitled SYSTEMS AND METHODS FORDETERMINING WHEN TO CALIBRATE A PRESSURE SENSOR OF A MOBILE DEVICE;which are hereby incorporated by reference in their entirety for allpurposes.

TECHNICAL FIELD

Aspects of this disclosure generally pertain to positioning of mobiledevices.

BACKGROUND

Determining the exact location of a mobile device (e.g., a smart phoneoperated by a user) in an environment can be quite challenging,especially when the mobile device is located in an urban environment oris located within a building. Imprecise estimates of the mobile device'saltitude, for example, may have life or death consequences for the userof the mobile device since the imprecise altitude estimate can delayemergency personnel response times as they search for the user onmultiple floors of a building. In less dire situations, imprecisealtitude estimates can lead a user to the wrong area in an environment.

Different approaches exist for estimating an altitude of a mobiledevice. In a barometric-based positioning system, altitude can becomputed using a measurement of pressure from a calibrated pressuresensor of a mobile device along with ambient pressure measurement(s)from a network of calibrated reference pressure sensors and ameasurement of ambient temperature from the network or other source. Anestimate of an altitude of a mobile device (h_(mobile)) can be computedby the mobile device, a server, or another machine that receives neededinformation as follows:

$\begin{matrix}{{h_{mobile} = {h_{sensor} - {\frac{RT_{remote}}{gM}\ln\left( \frac{P_{sensor}}{P_{mobile}} \right)}}},} & \left( {{Equation}1} \right)\end{matrix}$

where P_(mobile) is the estimate of pressure at the location of themobile device by a pressure sensor of the mobile device, P_(sensor) isan estimate of pressure at the location of a reference pressure sensorthat is accurate to within a tolerated amount of pressure from truepressure (e.g., less than 5 Pa), T_(remote) is an estimate oftemperature (e.g., in Kelvin) at the location of the reference pressuresensor or a different location of a remote temperature sensor,h_(sensor) is an estimated altitude of the reference pressure sensorthat is estimated to within a desired amount of altitude error (e.g.,less than 1.0 meters), g corresponds to the acceleration due to gravity,R is a gas constant, and M is molar mass of air (e.g., dry air orother). The minus sign (−) may be substituted with a plus sign (+) inalternative embodiments of Equation 1, as would be understood by one ofordinary skill in the art. The estimate of pressure at the location ofthe reference pressure sensor can be converted to an estimatedreference-level pressure that corresponds to the reference pressuresensor in that it specifies an estimate of pressure at the latitude andlongitude of the reference pressure sensor, but at a reference-levelaltitude that likely differs from the altitude of the reference pressuresensor. The reference-level pressure can be determined as follows:

$\begin{matrix}{{P_{ref} = {P_{sensor} \times \exp\left( {- \frac{g{M\left( {h_{ref} - h_{sensor}} \right)}}{RT_{remote}}} \right)}},} & \left( {{Equation}2} \right)\end{matrix}$

where P_(sensor) is the estimate of pressure at the location of thereference pressure sensor, P_(ref) is the reference-level pressureestimate, and h_(ref) is the reference-level altitude. The altitude ofthe mobile device h_(mobile) can be computed using Equation 1, whereh_(ref) is substituted for h_(sensor) and P_(ref) is substituted forP_(sensor). The reference-level altitude h_(ref) may be any altitude andis often set at mean sea-level (MSL). When two or more reference-levelpressure estimates are available, the reference-level pressure estimatesare combined into a single reference-level pressure estimate value(e.g., using an average, weighted average, or other suitable combinationof the reference pressures), and the single reference-level pressureestimate value is used for the reference-level pressure estimateP_(ref).

The pressure sensor of the mobile device is typically inexpensive andsusceptible to drift over time. Consequently, the pressure sensor mustbe frequently calibrated. A typical approach for calibrating a pressuresensor determines a calibration adjustment (C) that, when applied to ameasurement of pressure by the pressure sensor (P_(mobile)), results inan estimated altitude (h_(mobile)) that is within a tolerated amount ofdistance from the true altitude.

Unfortunately, the pressure sensor of a mobile device cannot becalibrated at every location of the mobile device, especially when themobile device is not known to be at a known altitude (e.g., of awaypoint). Local pressure variation effects at a location can produce alocalized pressure that does not align with outdoor pressure in avicinity of the location, which introduces unacceptable error into thecalibration result. Such pressure variation effects are common inbuildings with heating, ventilation, and air conditioning (HVAC) systemsand in vehicles that generate localized variations in pressure whilemoving. Not knowing the true altitude of a location within a toleratedamount error makes calibration impractical at such a location. Thetemperature inside the mobile device can also adversely affectmeasurements of pressure. However, calibration still must occur on aregular basis despite the above issues.

Different systems and methods for determining when to calibrate apressure sensor of a mobile device are described in the disclosure thatfollows.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an operational environment in which a pressure sensor of amobile device may be calibrated.

FIG. 2 depicts a process for determining when to calibrate a pressuresensor of a mobile device.

FIG. 3 depicts a process for using weighted metric values to determineif a pressure sensor of the mobile device should be calibrated usinginformation associated with a location at which the mobile resided.

FIG. 4 illustrates components of a transmitter, a mobile device, and aserver.

DETAILED DESCRIPTION

Systems and methods for determining when to calibrate a pressure sensorof a mobile device are described below.

Attention is initially drawn to an operational environment 100illustrated in FIG. 1 , which includes a network of terrestrialtransmitters 110 and at least one mobile device 120. Each of thetransmitters 110 and the mobile device 120 may be located at differentaltitudes or depths that are inside or outside various natural ormanmade structures (e.g. buildings) 190. Positioning signals 113 and 153are sent to the mobile device 120 from the transmitters 110 andsatellites 150, respectively, using known wireless or wired transmissiontechnologies. The transmitters 110 may transmit the signals 113 usingone or more common multiplexing parameters—e.g. time slot, pseudorandomsequence, frequency offset, or other. The mobile device 120 may takedifferent forms, including a mobile phone, a tablet, a laptop, atracking tag, a receiver, or another suitable device that can receivethe positioning signals 113 and/or 153, and that has a pressure sensorfor determining a measurement of pressure at a location of the mobiledevice 120. The mobile device 120 usually includes a temperature sensorwhere a temperature of the pressure sensor or a battery is measured,which can roughly represent an internal temperature of the mobile device120. Each of the transmitters 110 may also include a pressure sensor anda temperature sensor that respectively measure pressure and temperatureat the location of that transmitter 110. Measurements of pressure andtemperature can be used to compute an estimated altitude of the mobiledevice 120 using Equation 1, which is described in the Backgroundsection.

The pressure sensor of the mobile device 120 cannot be calibrated atevery location of the mobile device in the operational environment 100.For example, if the mobile device 120 entered a building with an HVACsystem that generates a localized pressure that does not align withoutdoor pressure for the same altitude (e.g., the indoor pressure hasbeen pushed or pulled by the HVAC system), future measurements ofpressure by the pressure sensor while the mobile device 120 is insidethe building may not be usable for calibration. If the exact position ofthe mobile device 120 is not known, and the possible positions of themobile device 120 are distributed throughout an area that hassignificant altitude variation (e.g., greater than 2 meters), thencalibration may not be possible where true altitude of the mobile device120 is uncertain. If the temperature inside the mobile device 120 whenat a particular location is high enough to distort pressure measurementsfrom the pressure sensor, calibration may not be possible withoutintroducing unacceptable error. Thus, solutions are needed fordetermining when a pressure sensor should or should not be calibrated.One approach for determining when to calibrate a pressure sensor of amobile device is provided below with reference to FIG. 2 .

Determining when to Calibrate a Pressure Sensor of a Mobile Device

A process for determining when to calibrate a pressure sensor of amobile device is shown in FIG. 2 .

As shown, for each metric of a plurality of metrics, a value of thatmetric is determined based on how data collected at an Nth location ofthe mobile device relates to a threshold condition of that metric (step210). By way of example, the Nth location may be a specific position atwhich the mobile device is located (e.g., a surveyed point), or an areain which the true position of the mobile device is located. Examples ofmetrics, values of metrics, collected data, and threshold conditions aredescribed later under the ‘Metrics’ section.

For each metric of the plurality of metrics, a weight for that metric isdetermined (step 220). The weights may be the same for each metric, ormay be different depending on desired implementation.

For each metric of the plurality of metrics, a weighted metric value isdetermined by applying the weight for that metric to the determinedvalue of that metric (step 230). In one embodiment of step 230, theweighted metric is determined by multiplying the determined metric valueand the weight.

Resultant weighted metric values are used to determine if a pressuresensor of the mobile device should be calibrated using informationassociated with the Nth location (step 240). Example methods forcalibrating a pressure sensor of a mobile device are provided later inthe ‘Calibration’ section. By way of example, the information associatedwith the Nth location may include: (i) a measurement of pressure at theNth location that was measured by the pressure sensor; and (ii) analtitude value representing the true altitude of the Nth location.Examples of the altitude value representing the true altitude of alocation include a known altitude of a specific position or a flat area,or a representative altitude of a non-flat area. Examples of arepresentative altitude value include: (i) a mean value of a pluralityof altitude values in an area of possible positions of the mobile device(e.g., where an initial position estimate for the mobile device haserror); (ii) a median value of the plurality of altitude values; (iii)the altitude value of a section at the center of the area in which themobile device is known to reside; (iv) the most-common altitude value ofthe plurality of altitude values; (v) an interpolated altitude amongcenters of sections in the area; (vi) an interpolated altitude amongcenters of tiles neighboring an initial estimate of the mobile device'sposition; or (vii) any of the above examples, but with a smoothingfilter applied. Each of these representative altitude values providedifferent advantages, as one of ordinary skill in the art wouldrecognize. In nearly all cases, a mobile device is located at someheight above terrain level during normal use—e.g., most of the time atthe hip level of a user (e.g., in a pocket or bag), or on a table. Anexpected height of a mobile device above terrain can be accounted forduring calibration (e.g., by adding the expected height above terrain tothe values of (i) through (vii), where the expected height is typicallyaround 0.75 to 1.0 meters.

If a determination is made that the pressure sensor of the mobile deviceshould be calibrated using the information associated with the Nthlocation, the pressure sensor of the mobile device is calibrated usingthe information associated with the Nth location (step 250).

If a determination is made that the pressure sensor of the mobile deviceshould not be calibrated using information associated with the Nthlocation, the information associated with the Nth location is not usedto calibrate the pressure sensor. Instead, the mobile device eventuallymoves to a new location, and the process of FIG. 2 is repeated for thenew location. Alternatively, conditions can change so that circumstancesare now more advantageous for calibration. For example, if in asubsequent fix the location confidence reduces (e.g., from 100 m down to10 m) owing to an improved position fix, which reduces the flatnessmetric and places the user outside, then the determination is made thatthe pressure sensor of the mobile device should be calibrated.

One embodiment of step 240 is depicted in FIG. 3 . As shown, theweighted metric values are used to determine a quality of an opportunityto calibrate the pressure sensor using a measurement of pressure at theNth location that was measured by the pressure sensor (step 341), and adetermination is made as to whether the determined quality of theopportunity to calibrate exceeds a threshold quality value (step 343).The formula below illustrates one embodiment of step 341:

$\begin{matrix}{{C = \frac{{w_{1}V_{1}} + \ldots + {w_{n}V_{n}}}{w_{1} + \ldots + w_{n}}},} & \left( {{Equation}3} \right)\end{matrix}$

where V₁ though V_(n) are metric values, w₁ though w_(n) arecorresponding weights applied to the metric values, and C represents thequality of the opportunity to calibrate the pressure sensor using theinformation associated with the Nth location. In step 343, a thresholdquality value C_(threshold) is compared to C to determine ifC≥C_(threshold). If C≥C_(threshold), then the pressure sensor of themobile device is calibrated using the information associated with theNth location (e.g., during step 250). If C<C_(threshold), then thepressure sensor of the mobile device is not calibrated using theinformation associated with the Nth location.

Metrics

Different metrics, metric values, collected data, and thresholdconditions are contemplated, as described below.

In different embodiments, any combination of different metrics listedbelow are used:

-   -   (i) Flatness metric (e.g., whether altitude(s) of the location        meet a threshold altitude variation condition);    -   (ii) Pressure variation effect metric (e.g., whether the        location is likely to be in a building or vehicle in which an        HVAC effect or stack/chimney effect is present, or in a vehicle        in which another pressure variation condition is present like a        Venturi effect, where the pressure variation effect can impact        the accuracy of a pressure measurement by the pressure sensor);    -   (iii) Building overlap metric (e.g., whether the location is        likely to be outside at a known ground altitude or within a        range of ground altitudes, and not inside a building at an        unknown floor or affected by an indoor pressure variation effect        that impacts accuracy of any pressure measurement, altitude        measurement or calibration);    -   (iv) Indoor-outdoor signal strength detection metric (e.g.,        whether measured satellite signal strengths for signals from        different satellites are above a threshold strength value that        indicates the location is likely to be outside at a known ground        altitude or within a range of ground altitudes, and not inside a        building at an unknown floor or affected by an indoor pressure        variation effect that impacts accuracy of any pressure        measurement, altitude measurement or calibration);    -   (v) Indoor-outdoor altitude detection metric (e.g., whether an        estimated altitude is above a threshold altitude that indicates        the location is likely to be inside a building and not at a        known ground altitude or within a range of ground altitudes; or        e.g., whether an estimated altitude is below a threshold        altitude that indicates the location is likely to be outside at        a known ground altitude or within a range of altitudes, and not        inside a building at an unknown floor or affected by an indoor        pressure variation effect that impacts accuracy of any pressure        measurement, altitude measurement or calibration);    -   (vi) Internal temperature metric (e.g., whether the internal        temperature of the mobile device, such as a battery temperature        retrieved from an API, is at a level of temperature that can        impact the accuracy of a pressure measurement by the pressure        sensor, which is sensitive to localized temperature that can        produce up to 1 meter or more of altitude error);    -   (vii) Movement mode metric (e.g., whether a type of movement of        the mobile device is conducive or not conducive for calibrating        the pressure sensor, such as a driving mode that indicates a        high likelihood a pressure variation effect exists that can        impact the accuracy of a pressure measurement by the pressure        sensor, which is different than a walking mode or a non-movement        mode that reduce the likelihood that pressure variation effect        exists; in some embodiments, subsequent types of movements can        be correlated to look for transitions from one type to another,        as certain transitions can more likely indicate better        calibration opportunity, such as transitioning from being in a        moving vehicle to being still, which likely indicates the        vehicle has parked or is otherwise stopped at a location with a        discernable altitude that offers a good opportunity to        calibrate); and    -   (viii) Time since last calibration metric (e.g., whether a        threshold amount of time has passed since the pressure sensor        was last calibrated according to calibration records stored on        the mobile device or a location remote from the mobile device,        where a time exceeding the threshold amount of time indicates a        need for calibration).

For each of the above metrics, examples of how a value of the metric isdetermined (e.g., during step 210) based on collected data and thresholdconditions are provided below:

-   -   (i) Flatness metric—One process for determining the value of a        flatness metric comprises: determining if a predefined        percentage of the altitudes in an area of possible positions of        the mobile device are within a first predefined distance of each        other or within a second predefined distance of a determined        altitude value (e.g., a mean or median of the altitudes within        the area or a specific latitude and longitude at the center of        an area of possible positions of a mobile device), where the        first and second predefined distances may be the same or        different, and defining the metric value based on the result of        the determination. By way of example, a first value of the        metric when the predefined percentage of the altitudes in the        area are within the first predefined distance from each other or        within the second predefined distance from the determined        altitude value within the area is higher than a second value of        the metric when the opposite is true. The flatness metric        represents how accurate a calibration result may be when the        true altitude of the mobile device is unknown, since having less        variation in possible altitudes of true position of the mobile        device reduces error in a calibration result, a pressure        measurement, or an altitude measurement. By way of example,        altitudes in an area can be obtained from a data source (e.g.,        an accessible data source of ground-level altitudes or building        floor altitudes that are inside the area), where the area may be        identified in different ways (e.g., the area includes a ground        level area and/or building floors that are within a predefined        distance from an initial estimate of the mobile device's        position, where the initial estimate of the position includes        estimated latitude and longitude and the predefined distance is        a possible amount of error in the estimated position or another        predefined distance; e.g., the area includes a defined area that        includes a beacon connected to the mobile device).    -   (ii) Pressure variation effect metric—One process for        determining the value of a pressure variation effect metric        comprises: determining if a predefined percentage of pressure        measurements from the pressure sensor during a predefined time        period are within a first predefined amount of pressure from        each other or within a second predefined amount of pressure from        a determined pressure value (e.g., a mean or median of the        pressure measurements) where the first and second predefined        amounts of pressure may be the same or different, and defining        the metric value based on the result of the determination. By        way of example, a first value of the metric when the predefined        percentage of the pressure measurements are within the first        predefined amount of pressure from each other or within the        second predefined amount of pressure from the determined        pressure value pressure measurements is higher than a second        value of the metric when the opposite is true. In an alternative        process, determining the value of a pressure variation effect        metric comprises: determining if a standard deviation of the        pressure measurements is within a threshold standard deviation        value, and defining the metric value based on the result of the        determination, where a first value of the metric when the        standard deviation of the pressure measurements is within the        threshold standard deviation value is higher than a second value        of the metric when the opposite is true. In an alternative        process, determining the value of a pressure variation effect        metric comprises: determining if any change in pressure during        the predefined period of time exceeds a predefined amount of        pressure change (e.g., a maximum amount of possible,        naturally-occurring pressure change for the predefined period of        time), and defining the metric value based on the result of the        determination, where a first value of the metric when any change        in pressure during the predefined period of time exceeds the        predefined amount of pressure change is lower than a second        value of the metric when the opposite is true. The pressure        variation effect metric represents how accurate a calibration        result may be depending on the possible existence of pressure        variations that are not aligned with natural pressure variation        and that may be due to HVAC effect, Venturi effect,        stack/chimney effect, or other localized pressure variation        effects. If detected pressure variation exceeds the boundaries        of expected natural pressure variation, then the value of this        metric indicates calibration should not occur using the        information associated with the Nth location.    -   (iii) Building overlap metric—One process for determining the        value of a building overlap metric comprises: determining a        percentage of the Nth location (e.g., when the Nth location is        an area of possible positions of the mobile device) that        overlaps with an area occupied by a building (e.g., a building's        footprint or polygon determined from a map or other data        source), and defining the metric value based on the percentage.        By way of example, the value of the metric is inversely        proportional to the percentage (i.e., the higher the overlap,        the lower the metric value). Another process for determining the        value of a building overlap metric comprises: determining        distances between the Nth location and one or more nearby        buildings, determining if the smallest distance exceeds a        threshold amount of distance, and defining the metric value        based on the result of the determination, where a first value of        the metric when the smallest distance exceeds the threshold        amount of distance is higher than a second value of the metric        when the smallest distance does not exceed the threshold amount        of distance. The building overlap metric is useful in        determining if the Nth location is not likely to be inside a        building. Knowing if the mobile device is not likely to be        inside a building (e.g., is likely to be outside) permits use of        known outdoor altitudes, which reduces possible calibration        error. In some situations, knowing that the mobile device is        inside a building but on the ground floor of that building        offers opportunities for calibration. Also, knowing if the        mobile device is not likely to be inside a building increases        confidence that a measurement of pressure by the pressure sensor        is not impacted by an unnatural pressure variation effect        produced by a building.    -   (iv) Indoor-outdoor signal strength detection metric—One process        for determining the value of an indoor-outdoor signal strength        detection metric comprises: determining if a measured strength        of a signal received by the mobile device from a satellite        exceeds a threshold signal strength value, and defining the        metric value based on the result of the determination. By way of        example, a first value of the metric when the measured signal        strength exceeds the threshold signal strength value is higher        than a second value of the metric when the measured signal        strength does not exceed the threshold signal strength value.        Another process for determining the value of an indoor-outdoor        signal strength detection metric comprises: determining if        measured strengths of signals received by the mobile device from        a minimum number satellites each exceed a threshold signal        strength value, and defining the metric value based on the        result of the determination, where a first value of the metric        when measured strengths of signals received from the minimum        number satellites each exceeds the threshold signal strength        value is higher than a second value of the metric when all of        the measured strengths of signals received from the minimum        number satellites do not exceed the threshold signal strength        value. Another process for determining the value of an        indoor-outdoor signal strength detection metric comprises:        determining if a measured strength of a signal received by the        mobile device from a beacon located inside a building exceeds a        threshold signal strength value, and defining the metric value        based on the result of the determination, where a first value of        the metric when the measured signal strength exceeds the        threshold signal strength value (e.g., when the signal is        assumed to have been received inside the building) is lower than        a second value of the metric when the measured signal strength        does not exceed the threshold signal strength value. The        indoor-outdoor signal strength detection metric is useful in        determining if the Nth location is not likely to be inside a        building (e.g., when measured strengths of signals of satellites        maintain a signal level that is common for outdoor reception of        the signals) or when the Nth location is likely to be inside a        building (e.g., when measured strengths of signals of indoor        beacons maintain a signal level that is common for indoor        reception of the signals). The same benefits of knowing if the        mobile device is not likely to be inside a building described        above for the building overlap metric apply to the        indoor-outdoor signal strength detection metric.    -   (v) Indoor-outdoor altitude detection metric—One process for        determining the value of an indoor-outdoor altitude detection        metric comprises: determining if a difference between an        estimated altitude of the Nth location and an outdoor altitude        (e.g., retrieved from a data source of ground-level outdoor        altitudes) exceeds a threshold amount of altitude, and defining        the metric value based on the result of the determination. By        way of example, a first value of the metric when the difference        exceeds the threshold amount of altitude is lower than a second        value of the metric when the difference does not exceed the        threshold amount of altitude. The indoor-outdoor altitude        detection metric is useful in determining if the Nth location is        likely to be inside a building (e.g., when the difference        between an estimated altitude and an outdoor altitude exceeds a        possible altitude error value, such that the Nth location is        likely to be inside a building). Knowing if the mobile device is        likely to be inside a building (e.g., is not likely to be        outside) makes use of known outdoor altitudes for calibration        less reliable even when an indoor altitude is unknown, which        increases possible calibration error from using the outdoor        altitude. Also, knowing if the mobile device is likely to be        inside a building recognizes the risk that a measurement of        pressure by the pressure sensor could be impacted by an        unnatural pressure variation effect often produced by buildings.    -   (vi) Internal temperature metric—One process for determining the        value of an internal temperature metric comprises: determining        if a battery temperature of the mobile device when at the Nth        location exceeds a threshold temperature value, and defining the        metric value based on the result of the determination. By way of        example, a first value of the metric when the battery        temperature exceeds the threshold temperature value is lower        than a second value of the metric when the battery temperature        does not exceed the threshold temperature value. Measurements of        pressure that are measured by a pressure sensor of a mobile        device can be affected by the internal temperature of the mobile        device, and error in an altitude computation due to the internal        temperature can exceed a tolerated amount of error (e.g., 1        meter or more). Thus, it is helpful to identify circumstances        when the measurement of pressure at the Nth location that was        measured by the pressure sensor of the mobile device may be        affected by the internal temperature of the mobile device. By        way of example, battery temperature may be measured using a        temperature sensor of the mobile device.    -   (vii) Movement mode metric—One process for determining the value        of a movement mode metric comprises: determining a mode (e.g.,        not moving, moving at a walking speed, moving with a vehicle, or        unknown, as retrieved from an API), and defining the metric        value based on the result of the determination. By way of        example, a first value of the metric when the mode indicates the        mobile device is not moving is higher than a second value of the        metric when the mode indicates movement of the mobile device        does not exceed a predefined walking speed, which is higher than        a third value of the metric when the mode indicates movement of        the mobile device is expected to be within a vehicle or when the        mode is unknown. This metric represents a likelihood that the        mobile device is not inside a moving vehicle. Since pressure        variation inside moving vehicles can result in unreliable        pressure measurements from the pressure sensor (e.g., due to the        Venturi effect, HVAC, or a combination of the two), knowing if        the mobile device is not likely to be in a moving vehicle        increases confidence that calibration should occur using        information associated with the Nth location. Determination of a        movement mode can come from different sources, including        inertial sensor measurements, a navigation application, or        detecting a measured pressure profile that is due to vehicle        movement. Also, in some embodiments, a determination is made        that the mobile device has transitioned between different        movement modes, which allows for correlating the movement as an        indicator that the current mode provides for high confidence        that the mobile device is in an optimal situation for sensor        calibration—e.g., Driving/In Moving Vehicle mode followed by        Still/Stationary mode likely indicates that a user parked        his/her car and is likely to be at ground level and not likely        to be in an upper floor of a building.    -   (viii) Time since last calibration metric—One process for        determining the value of a time since last calibration metric        comprises: determining a time since a last calibration of the        pressure sensor (e.g., determined from a stored calibration        history, which may include a time stamp of the last calibration,        which can be compared to a current time of a clock), and        defining the metric value based on the result of the        determination. By way of example, a first value of the metric        when the time exceeds a threshold amount of time is higher than        a second value of the metric when the time does not exceed the        threshold amount. This metric represents how likely drift has        exceeded a tolerated amount of drift, since more drift typically        occurs as more time passes since the previous calibration.

Different types of metric values are contemplated, including: a binaryvalue (e.g., threshold is met=1, threshold is not met=0), a linear value(e.g., highest threshold is met=1, highest threshold is not met, butlowest threshold is met=0.5, lowest threshold is not met=0), or someother pre-defined set of values. Examples of possible values fordifferent metrics are provided below:

-   -   (i) Flatness metric example values:        -   a. when at least P % of altitudes are within m meters from            each other or a mean of the altitudes (e.g., value=1;            otherwise value=0), where P and m may be predefined numbers            (e.g., 80% and 1 meter, respectively);        -   b. when at least P₁% of altitudes are within m meters from            each other or a mean of the altitudes (e.g., value=1.0),            when less than P₁% but at least P₂% of altitudes are within            m meters from each other or a mean of the altitudes (e.g.,            value=0.5), when less than P₂% of altitudes are within m            meters from each other or a mean of the altitudes (e.g.,            value=0.0), where P₁, P₂ and m may be predefined numbers            (e.g., 80%, 60% and 1 meter, respectively); or        -   c. when at least P % of altitudes are within m₁ meters from            each other or a mean of the altitudes (e.g., value=1.0),            when at least P % of altitudes are not within m₁ meters, but            are within m₂ meters from each other or a mean of the            altitudes (e.g., value=0.5), when at least P % of altitudes            are not within m₂ meters from each other or a mean of the            altitudes (e.g., value=0.0), where P, m₁, and m₂ may be            predefined numbers (e.g., 80%, 1 meter and 2 meters,            respectively).        -   d. Note: a mean was used in the examples above; however, in            other embodiments, a median or other value-of-interest can            be used instead of a mean.    -   (ii) Pressure variation effect metric example values:        -   a. over a time period T, when at least P % pressure            measurements are within p Pa of each other or a mean of the            pressure measurements (e.g., value=1; otherwise value=0),            where T, P and p may be predefined numbers (e.g., 1 minute,            80% and 10 Pa, respectively);        -   b. over a time period T, when at least P₁% of pressure            measurements are within p Pa of each other or a mean of the            pressure measurements (e.g., value=1.0), when less than P₁%            but at least P₂% of pressure measurements are within p Pa of            each other or a mean of the pressure measurements (e.g.,            value=0.5), when less than P₂% of pressure measurements are            within p Pa of each other or a mean of the pressure            measurements (e.g., value=0.0), where T, P₁, P₂ and p may be            predefined numbers (e.g., 1 minute, 90%, 75%, and 10 Pa,            respectively); or        -   c. over a time period T, when at least P % of pressure            measurements are within p₁ Pa of each other or a mean of the            pressure measurements (e.g., value=1.0), when P % of            pressure measurements are not within p₁ Pa of each other or            a mean of the pressure measurements, but are within p₂ Pa of            each other or a mean of the pressure measurements (e.g.,            value=0.5), when P % of pressure measurements are not within            p₂ Pa of each other or a mean of the pressure measurements            (e.g., value=0.0), where T, p₁, p₂ and P may be predefined            numbers (e.g., 1 minute, 10 Pa, 20 Pa, and 90%,            respectively).        -   d. Note: a mean was used in the examples above; however, in            other embodiments, a median or other value-of-interest can            be used instead of a mean.    -   (iii) Building overlap metric example values:        -   a. when P % of an area of possible positions of the mobile            device overlaps with a building (e.g., value=[100−P]/100);        -   b. when at least P % of an area of possible positions of the            mobile device does not overlap with a building (e.g.,            value=1; otherwise value=0), where P may be a predefined            number (e.g., 50%); or        -   c. when at least P₁% of an area of possible positions of the            mobile device does not overlap with a building (e.g.,            value=1.0), when less than P₁% but at least P₂% of an area            of possible positions of the mobile device does not overlap            with a building (e.g., value=0.5), when less than P₂% of an            area of possible positions of the mobile device does not            overlap with a building (e.g., value=0.0), where P₁ and P₂            may be a predefined number (e.g., 80% and 50%,            respectively).    -   (iv) Indoor-outdoor signal strength detection metric example        values:        -   a. when signals from at least n satellites each have a            signal strength of at least S dB (e.g., value=1; otherwise            value=0), where n and S may be predefined numbers (e.g., 4            satellites and 30 dB, respectively);        -   b. when all signals from at least n₁ satellites each have a            signal strength of at least S dB (e.g., value=1.0), when all            signals from at least n₁ satellites do not have a signal            strength of at least S dB, but all signals from n₂ (for n₂            less than n₁) satellites each have a signal strength of at            least S dB (e.g., value=0.5), when all signals from n₂            satellites do not have a signal strength of at least S dB            (e.g., value=0.0), where n₁, n₂ and S may be predefined            numbers (e.g., 4 satellites, 3 satellites, and 30 dB,            respectively); or        -   c. when all signals from at least n satellites each have a            signal strength of at least S₁ dB (e.g., value=1.0), when            all signals from at least n satellites do not have a signal            strength of at least S₁ dB, but all signals from at least n            satellites each have a signal strength of at least S₂ (for            S₂ less than S₁) dB (e.g., value=0.5), when all signals from            n satellites do not have a signal strength of at least S₂ dB            (e.g., value=0.0), where n, S₁ and S₂ may be predefined            numbers (e.g., 4 satellites, 30 dB, and 20 dB,            respectively).    -   (v) Indoor-outdoor altitude detection metric example values:        when an estimated altitude of the mobile device while at the Nth        location is greater than a predefined amount of altitude A from        an altitude (e.g., ground-level) of an outdoor position that is        within a threshold distance from an initial estimate of the        mobile device's position (e.g., value=0; otherwise value=1),        where A may be predefined (e.g., 5 meters); or when an estimated        altitude of the mobile device while at the Nth location is        greater than or equal to a first predefined amount of altitude        A₁ from an altitude of an outdoor position that is within a        threshold distance from an initial estimate of the mobile        device's position (e.g., value=0), when the estimated altitude        of the mobile device while at the Nth location is less than the        first predefined amount of altitude A₁, but greater than or        equal to a second predefined amount of altitude A₂ from the        altitude of the outdoor position (e.g., value=0.5), and when the        estimated altitude of the mobile device while at the Nth        location is less than the second predefined amount of altitude        A₂ from the altitude of the outdoor position (e.g., value=1),        where A₁=5 meters, and A₂=3 meters.    -   (vi) Internal temperature metric example values: when an        internal temperature (e.g., a measured battery temperature or a        measured temperature of the pressure sensor of the mobile        device) is less than a predefined amount of temperature T (e.g.,        value=1; otherwise value=0), where T may be predefined (e.g., 35        degrees Celsius); or when the internal temperature is less than        a first predefined amount of temperature T₁ (e.g., value=1),        when the internal temperature is greater than or equal to the        first predefined amount of temperature T₁ and less than a second        predefined amount of temperature T₂ (e.g., value=0.5), and when        the internal temperature is greater than or equal to the second        predefined amount of temperature T₂ (e.g., value=0.0), where T₁        and T₂ may be predefined (e.g., 30 and 35 degrees Celsius,        respectively).    -   (vii) Movement mode metric example values: when no movement is        detected (e.g., value=1), when walking movement is detected        (e.g., value=1 or lower value greater than 0), when driving        movement is detected (e.g., value=0), when status of movement        unknown (e.g., value=0 or higher value less than 1).    -   (viii) Movement mode transition metric example values: if a user        transitions from Driving to Still (e.g., value=1). If a user        transitions from Still to Walking (e.g. value=0.5). If a user        transitions from Still to Driving (e.g. value=0.0).    -   (ix) Time since last calibration metric example values: when a        time since last calibration is greater than a predefined amount        of time T (e.g., value=1; otherwise value=0), where T may be        predefined depending on the expected drift of the pressure        sensor (e.g., 48 hours).

Different ways of using metric values are contemplated. For example,higher metric values can be used for circumstances that indicate thepressure sensor of the mobile device should be calibrated usinginformation associated with the Nth location, and lower metric valuescan be used for circumstances that indicate the pressure sensor of themobile device should not be calibrated using information associated withthe Nth location. Alternatively, lower metric values can be used forcircumstances that indicate the pressure sensor of the mobile deviceshould be calibrated using information associated with the Nth location,and higher metric values can be used for circumstances that indicate thepressure sensor of the mobile device should not be calibrated usinginformation associated with the Nth location.

The weights used to produce weighted values may be the same for eachmetric, or different depending on the metric. Some weights might begreater than others (e.g., the weight for the time since lastcalibration metric may be greater than weights for other metrics wherethe amount of drift is believed to exceed any amount of error introducedby other issues).

Weighted values can be combined in different ways to produce a valuethat represents how good of an opportunity an Nth location provides forcalibrating a pressure sensor of a mobile device. Example combinationsinclude a weighted mean or other combinations. The produced value (e.g.,a number between 0 and 1) may then be compared (e.g., as being greaterthan or less than) to a threshold value (e.g., a number between 0 and 1,such as 0.5) to determine if calibration should occur.

Calibration

One approach for calibrating a pressure sensor of a mobile device isdescribed below. Initially, an estimated altitude h_(mobile) is computedas:

$\begin{matrix}{{h_{mobile} = {h_{ref} \mp {\frac{RT_{remote}}{gM}\ln\left( \frac{P_{ref}}{P_{mobile}} \right)}}},} & \left( {{Equation}4} \right)\end{matrix}$

where P_(mobile) is the estimate of pressure at the location of themobile device, P_(ref) is an estimate of pressure at a referencelocation, T_(remote) is an estimate of ambient temperature (e.g., inKelvin), h_(ref) is the known altitude of the reference location, gcorresponds to acceleration due to gravity, R is a gas constant, and Mis molar mass of air (e.g., dry air or other). To calibrate the pressuresensor of the mobile device, the aim is to determine an adjustment tothe value of P_(mobile) such that h_(mobile) is within a toleratedamount of distance from the true altitude of the mobile device,h_(truth).

During calibration, a representative altitude value of the area in whichthe mobile device is expected to reside can be assigned as the truealtitude of the mobile device, h_(truth). Alternatively, therepresentative altitude value adjusted by a typical height at which themobile device is likely to be held above the ground can be assigned asthe true altitude of the mobile device, h_(truth). Examples ofrepresentative altitude values are described earlier with respect tostep 240 of FIG. 2 .

Once the true altitude of the mobile device, h_(truth), is determined, acalibration value C needed to adjust the estimate of pressure at thelocation of the mobile device, P_(mobile), is determined using theformula below:

$\begin{matrix}{h_{truth} = {h_{ref} \mp {\frac{RT}{gM}\ln{\left( \frac{P_{reference}}{P_{mobile} + C} \right).}}}} & \left( {{Equation}5} \right)\end{matrix}$

Alternatively, differentiating pressure with respect to height can beused to help determine the calibration value C. The followingrelationship:

$\begin{matrix}{{P_{{at}h_{1}} = {P_{{at}h_{2}}\exp\left( \frac{g{M\left( {h_{2} - h_{1}} \right)}}{RT} \right)}},} & \left( {{Equation}6} \right)\end{matrix}$

can be used to derive the following formula:

$\begin{matrix}{{\frac{dP}{dh} = {\frac{gMP}{RT} \approx {{0.0}34\frac{P}{T}}}}.} & \left( {{Equation}7} \right)\end{matrix}$

If a pressure measurement of by the mobile device is P=101000 Pa andambient temperature is T=300 K, the formula of Equation 7 results indP/dh≈11.5 Pa/m. The values of P and T are reasonable assumptions fornominal weather, and the scale factor of 11.5 Pa/m can range between˜9-12 Palm if the weather gets cooler or hotter. This means for everymeter adjustment to be made to get h_(truth) to align with h_(mobile)the calibration value C can be adjusted by 11.5 Pa. In this example, ifh_(mobile)=12.0 m and h_(truth)=8 m, the difference in altitude can bescaled by 11.5 Palm to get the difference in pressure, or C=46 Pa asshown below:

$\begin{matrix}{C = {{\left( {h_{truth} - h_{phone}} \right) \times \frac{dP}{dh}} = {{\left( {{12} - 8} \right) \times 1{1.5}} = 46.}}} & \left( {{Equation}8} \right)\end{matrix}$

Technical Benefits

Processes described herein improve the fields of sensor calibration andlocation determination by determining when circumstances permiteffective calibration of a sensor that is necessary for accuratealtitude determination. Prior approaches that do not detect undesirablecircumstances for calibration are more likely to calibrate sensors orestimate positions with less or even unacceptable accuracy. By improvingcalibration of a pressure sensor of a mobile device, processes describedherein provide for increased accuracy and reliability of estimatedpositions based on that improved calibration, which enables quickeremergency response times or otherwise improves the usefulness ofestimated positions. Battery life of a mobile device is improved byselectively not performing calibration at a mobile device (and thereforenot consuming battery life needed for calibration) during certaincircumstances when other approaches would consume battery capacity bynon-selectively calibrating the pressure sensor. Equipment that issusceptible to producing previously unusable data (e.g., a pressuresensor that produces pressure data with lower-than-desirable accuracydue to drift or inherent resolution of the equipment) is improved byproviding for improved calibration of that previously unusable equipmentand its data. The processes create new and useful data, such as datarepresenting a quality of an opportunity to calibrate, which isindicative of when calibration of a pressure sensor should or should notoccur. Prior approaches that do not produce this data prior tocalibration or position determination are more likely to calibrate orestimate positions with less accuracy.

Other Aspects

By way of example, the processes disclosed above may be performed by oneor more machines that include: processor(s) or other computing device(s)(e.g., at a mobile device and/or a server) for performing (e.g., thatperform, or are configured, adapted or operable to perform) each step;data source(s) at which any data identified in the processes is storedfor later access during the processes; and particular machines forobtaining data used to determine metrics (e.g., signal processingcomponents to determine signal strengths, a temperature sensor tomeasure temperatures, a pressure sensor to measure pressures, a clock tomeasure time, inertial sensors to measure movement, or other machines).

Any method (also referred to as a “process” or an “approach”) describedor otherwise enabled by disclosure herein may be implemented by hardwarecomponents (e.g., machines), software modules (e.g., stored inmachine-readable media), or a combination thereof. By way of example,machines may include one or more computing device(s), processor(s),controller(s), integrated circuit(s), chip(s), system(s) on a chip,server(s), programmable logic device(s), field programmable gatearray(s), electronic device(s), special purpose circuitry, and/or othersuitable device(s) described herein or otherwise known in the art. Oneor more non-transitory machine-readable media embodying programinstructions that, when executed by one or more machines, cause the oneor more machines to perform or implement operations comprising the stepsof any of the methods described herein are contemplated herein. As usedherein, machine-readable media includes all forms of machine-readablemedia (e.g. one or more non-volatile or volatile storage media,removable or non-removable media, integrated circuit media, magneticstorage media, optical storage media, or any other storage media,including RAM, ROM, and EEPROM) that may be patented under the laws ofthe jurisdiction in which this application is filed, but does notinclude machine-readable media that cannot be patented under the laws ofthe jurisdiction in which this application is filed. Systems thatinclude one or more machines and one or more non-transitorymachine-readable media are also contemplated herein. One or moremachines that perform or implement, or are configured, operable oradapted to perform or implement operations comprising the steps of anymethods described herein are also contemplated herein. Method stepsdescribed herein may be order independent and can be performed inparallel or in an order different from that described if possible to doso. Different method steps described herein can be combined to form anynumber of methods, as would be understood by one of ordinary skill inthe art. Any method step or feature disclosed herein may be omitted froma claim for any reason. Certain well-known structures and devices arenot shown in figures to avoid obscuring the concepts of the presentdisclosure. When two things are “coupled to” each other, those twothings may be directly connected together, or separated by one or moreintervening things. Where no lines or intervening things connect twoparticular things, coupling of those things is contemplated in at leastone embodiment unless otherwise stated. Where an output of one thing andan input of another thing are coupled to each other, information sentfrom the output is received in its outputted form or a modified versionthereof by the input even if the information passes through one or moreintermediate things. Any known communication pathways and protocols maybe used to transmit information (e.g., data, commands, signals, bits,symbols, chips, and the like) disclosed herein unless otherwise stated.The words comprise, comprising, include, including and the like are tobe construed in an inclusive sense (i.e., not limited to) as opposed toan exclusive sense (i.e., consisting only of). Words using the singularor plural number also include the plural or singular number,respectively, unless otherwise stated. The word “or” and the word “and”as used in the Detailed Description cover any of the items and all ofthe items in a list unless otherwise stated. The words some, any and atleast one refer to one or more. The terms may or can are used herein toindicate an example, not a requirement—e.g., a thing that may or canperform an operation, or may or can have a characteristic, need notperform that operation or have that characteristic in each embodiment,but that thing performs that operation or has that characteristic in atleast one embodiment. Unless an alternative approach is described,access to data from a source of data may be achieved using knowntechniques (e.g., requesting component requests the data from the sourcevia a query or other known approach, the source searches for and locatesthe data, and the source collects and transmits the data to therequesting component, or other known techniques).

FIG. 4 illustrates components of a transmitter, a mobile device, and aserver. Examples of communication pathways are shown by arrows betweencomponents.

By way of example in FIG. 4 , each of the transmitters may include: amobile device interface 11 for exchanging information with a mobiledevice (e.g., an antenna and RF front end components known in the art orotherwise disclosed herein); one or more processor(s) 12; memory/datasource 13 for providing storage and retrieval of information and/orprogram instructions; atmospheric sensor(s) 14 for measuringenvironmental conditions (e.g., pressure, temperature, other) at or nearthe transmitter; a server interface 15 for exchanging information with aserver (e.g., an antenna, a network interface, or other); and any othercomponents known to one of ordinary skill in the art. The memory/datasource 13 may include memory storing software modules with executableinstructions, and the processor(s) 12 may perform different actions byexecuting the instructions from the modules, including: (i) performanceof part or all of the methods as described herein or otherwiseunderstood by one of skill in the art as being performable at thetransmitter; (ii) generation of positioning signals for transmissionusing a selected time, frequency, code, and/or phase; (iii) processingof signaling received from the mobile device or other source; or (iv)other processing as required by operations described in this disclosure.Signals generated and transmitted by a transmitter may carry differentinformation that, once determined by a mobile device or a server, mayidentify the following: the transmitter; the transmitter's position;environmental conditions at or near the transmitter; and/or otherinformation known in the art. The atmospheric sensor(s) 14 may beintegral with the transmitter, or separate from the transmitter andeither co-located with the transmitter or located in the vicinity of thetransmitter (e.g., within a threshold amount of distance).

By way of example FIG. 4 , the mobile device may include: a transmitterinterface 21 for exchanging information with a transmitter (e.g., anantenna and RF front end components known in the art or otherwisedisclosed herein); one or more processor(s) 22; memory/data source 23for providing storage and retrieval of information and/or programinstructions; atmospheric sensor(s) 24 for measuring environmentalconditions (e.g., pressure, temperature, other) at the mobile device;other sensor(s) 25 for measuring other conditions (e.g., inertialsensors for measuring movement and orientation); a user interface 26(e.g., display, keyboard, microphone, speaker, other) for permitting auser to provide inputs and receive outputs; another interface 27 forexchanging information with the server or other devices external to themobile device (e.g., an antenna, a network interface, or other); and anyother components known to one of ordinary skill in the art. A GNSSinterface and processing unit (not shown) are contemplated, which may beintegrated with other components (e.g., the interface 21 and theprocessors 22) or a standalone antenna, RF front end, and processorsdedicated to receiving and processing GNSS signaling. The memory/datasource 23 may include memory storing software modules with executableinstructions, and the processor(s) 22 may perform different actions byexecuting the instructions from the modules, including: (i) performanceof part or all of the methods as described herein or otherwiseunderstood by one of ordinary skill in the art as being performable atthe mobile device; (ii) estimation of an altitude of the mobile devicebased on measurements of pressure form the mobile device andtransmitter(s), temperature measurement(s) from the transmitter(s) oranother source, and any other information needed for the computation);(iii) processing of received signals to determine position information(e.g., times of arrival or travel time of the signals, pseudorangesbetween the mobile device and transmitters, transmitter atmosphericconditions, transmitter and/or locations or other transmitterinformation); (iv) use of position information to compute an estimatedposition of the mobile device; (v) determination of movement based onmeasurements from inertial sensors of the mobile device; (vi) GNSSsignal processing; or (vii) other processing as required by operationsdescribed in this disclosure.

By way of example FIG. 4 , the server may include: a mobile deviceinterface 21 for exchanging information with a mobile device (e.g., anantenna, a network interface, or other); one or more processor(s) 32;memory/data source 33 for providing storage and retrieval of informationand/or program instructions; a transmitter interface 34 for exchanginginformation with a transmitter (e.g., an antenna, a network interface,or other); and any other components known to one of ordinary skill inthe art. The memory/data source 33 may include memory storing softwaremodules with executable instructions, and the processor(s) 32 mayperform different actions by executing instructions from the modules,including: (i) performance of part or all of the methods as describedherein or otherwise understood by one of ordinary skill in the art asbeing performable at the server; (ii) estimation of an altitude of themobile device; (iii) computation of an estimated position of the mobiledevice; or (iv) other processing as required by operations described inthis disclosure. Steps performed by servers as described herein may alsobe performed on other machines that are remote from a mobile device,including computers of enterprises or any other suitable machine.

Certain aspects disclosed herein relate to estimating the positions ofmobile devices—e.g., where the position is represented in terms of:latitude, longitude, and/or altitude coordinates; x, y, and/or zcoordinates; angular coordinates; or other representations. Varioustechniques to estimate the position of a mobile device can be used,including trilateration, which is the process of using geometry toestimate the position of a mobile device using distances traveled bydifferent “positioning” (or “ranging”) signals that are received by themobile device from different beacons (e.g., terrestrial transmittersand/or satellites). If position information like the transmission timeand reception time of a positioning signal from a beacon are known, thenthe difference between those times multiplied by speed of light wouldprovide an estimate of the distance traveled by that positioning signalfrom that beacon to the mobile device. Different estimated distancescorresponding to different positioning signals from different beaconscan be used along with position information like the locations of thosebeacons to estimate the position of the mobile device. Positioningsystems and methods that estimate a position of a mobile device (interms of latitude, longitude and/or altitude) based on positioningsignals from beacons (e.g., transmitters, and/or satellites) and/oratmospheric measurements are described in co-assigned U.S. Pat. No.8,130,141, issued Mar. 6, 2012, and U.S. Pat. Pub. No. 2012/0182180,published Jul. 19, 2012. It is noted that the term “positioning system”may refer to satellite systems (e.g., Global Navigation SatelliteSystems (GNSS) like GPS, GLONASS, Galileo, and Compass/Beidou),terrestrial transmitter systems, and hybrid satellite/terrestrialsystems.

1. A method, comprising: for each metric of a plurality of metrics,determining a weighted metric value by applying a weight for that metricto a determined value of that metric; using the weighted metric valuesto determine if a pressure sensor of a mobile device should becalibrated using information associated with a first location; and ifthe pressure sensor of the mobile device should be calibrated using theinformation associated with the first location, using the informationassociated with the first location to calibrate the pressure sensor ofthe mobile device.
 2. The method of claim 1, wherein using the weightedmetric values to determine if a pressure sensor of a mobile deviceshould be calibrated using information associated with a first locationcomprises: using the weighted metric values to determine a quality of anopportunity to calibrate the pressure sensor of the mobile device usinga measurement of pressure of the first location that was measured by thepressure sensor; and determining if the determined quality of theopportunity to calibrate exceeds a threshold quality value, wherein theinformation includes the measurement of pressure and the pressure sensorof the mobile device is calibrated using the measurement of pressure ifthe determined quality of the opportunity to calibrate exceeds thethreshold quality value.
 3. The method of claim 1, wherein if thepressure sensor of the mobile device should not be calibrated using theinformation associated with the first location, the method furthercomprises: for each metric of the plurality of metrics, determining anew value of that metric based on how data collected at a secondlocation of the mobile device relates to a threshold condition of thatmetric; for each metric of the plurality of metrics, determining a newweighted metric value by applying the weight for that metric, or a newweight for that metric, to the determined new value of that metric;using the new weighted metric values to determine if the pressure sensorof the mobile device should be calibrated using information associatedwith the second location; and if the pressure sensor of the mobiledevice should be calibrated using the information associated with thesecond location, using the information associated with the secondlocation to calibrate the pressure sensor of the mobile device.
 4. Themethod of claim 1, wherein determining a weighted metric value byapplying the weight for that metric to the metric comprises: determiningthe weighted metric value by multiplying the value of that metric andthe weight.
 5. The method of claim 1, wherein the information associatedwith the first location includes a measurement of pressure at the firstlocation that was measured by the pressure sensor, and an altitude valueassociated with the first location.
 6. The method of claim 5, thealtitude value associated with the first location includes a knownaltitude of a specific position or flat area.
 7. The method of claim 5,the altitude value associated with the first location includes arepresentative altitude of a non-flat area.
 8. The method of claim 1,wherein one of the metrics represents whether altitudes of the firstlocation meet a threshold altitude variation condition.
 9. The method ofclaim 1, wherein one of the metrics represents whether the firstlocation is likely to be in a building or vehicle in which an HVACeffect or stack/chimney effect is present, or in a vehicle in whichanother pressure variation condition is present.
 10. The method of claim1, wherein one of the metrics represents whether the first location islikely to be at a ground floor of a building, outside at a known groundaltitude, or within a range of altitudes.
 11. The method of claim 1,wherein one of the metrics represents whether measured satellite signalstrengths for signals from different satellites are above a thresholdstrength value that indicates the first location is likely to be outsideat a known ground altitude or within a range of altitudes.
 12. Themethod of claim 1, wherein one of the metrics represents whether anestimated altitude is above a threshold altitude that indicates thefirst location is likely to be inside a building and not at a knownground altitude or within a range of altitudes.
 13. The method of claim1, wherein one of the metrics represents whether an internal temperatureof the mobile device is at a level of temperature that can impact anaccuracy of a pressure measurement by the pressure sensor.
 14. Themethod of claim 1, wherein one of the metrics represents whether a typeof movement of the mobile device is conducive or not conducive forcalibrating the pressure sensor.
 15. The method of claim 1, wherein oneof the metrics represents whether a threshold amount of time has passedsince the pressure sensor was last calibrated according to calibrationrecords stored on the mobile device or a location remote from the mobiledevice.
 16. The method of claim 15, wherein the weight for the metricrepresenting whether a threshold amount of time has passed since thepressure sensor was last calibrated is greater than weights for othermetrics of the plurality of metrics.
 17. The method of claim 1, whereina first weight for a first metric of the plurality of metrics is greaterthan a second weight of a second metric of the plurality of metrics,wherein the first metric represents whether a threshold amount of timehas passed since the pressure sensor was last calibrated.
 18. The methodof claim 1, wherein the plurality of metrics include two or more metricsfrom the following: a metric representing whether altitudes of the firstlocation meet a threshold altitude variation condition; a metricrepresenting whether the first location is likely to be in a building orvehicle in which an HVAC effect or stack/chimney effect is present, orin a vehicle in which another pressure variation condition is present; ametric representing whether the first location is likely to be outsideat a known ground altitude or within a range of altitudes; a metricrepresenting whether measured satellite signal strengths for signalsfrom different satellites are above a threshold strength value thatindicates the first location is likely to be outside at a known groundaltitude or within a range of altitudes; a metric representing whetheran estimated altitude is above a threshold altitude that indicates thefirst location is likely to be inside a building and not at a knownground altitude or within a range of altitudes; a metric representingwhether an internal temperature of the mobile device is at a level oftemperature that can impact an accuracy of a pressure measurement by thepressure sensor; a metric representing whether a type of movement of themobile device is conducive or not conducive for calibrating the pressuresensor; and a metric representing whether a threshold amount of time haspassed since the pressure sensor was last calibrated according tocalibration records stored on the mobile device or a location remotefrom the mobile device.
 19. One or more non-transitory machine-readablemedia embodying program instructions that, when executed by one or moremachines, cause the one or more machines to implement the method ofclaim
 1. 20. A system for determining when to calibrate a pressuresensor of a mobile device, the system comprising one or more machinesconfigured to perform the method of claim 1.